#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import rospy
import math
import threading
from threading import Lock
from sensor_msgs.msg import JointState
from serial_init import SerialControl  # 自定义串口控制模块

# **************************"写入示例代码"**************************
# rads = [0.5, 0.5, 0.5, 0.5, 0.5]
# ser = SerialControl('/dev/ttyUSB0', 115200)
# ser.send_command(rads, machine="arm")

# **************************"读取示例代码"**************************
ser = SerialControl('/dev/ttyUSB0', 115200)
data = ser.get_rads_data(machine="arm")
print(data)
